package com.zff.rental.mapstruct.apartment;


import com.zff.rental.entity.apartment.SuitesTypeEntity;
import com.zff.rental.mapstruct.BaseMapstruct;
import com.zff.rental.vo.apartment.suites.AddSuitesTypeParams;
import com.zff.rental.vo.apartment.suites.ModifySuitesTypeParams;
import com.zff.rental.vo.apartment.suites.SuitesTypeVo;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author HCY
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface SuitesTypeMapstruct extends BaseMapstruct {
    SuitesTypeMapstruct INSTANCE = Mappers.getMapper(SuitesTypeMapstruct.class);

    SuitesTypeVo map(SuitesTypeEntity findResult);

    SuitesTypeEntity map(AddSuitesTypeParams params);

    @Mapping(target = "id", ignore = true)
    @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
    void merge(@MappingTarget SuitesTypeEntity target, ModifySuitesTypeParams source);

    List<SuitesTypeVo> mapAsList(List<SuitesTypeEntity> records);
}
